package com.meteor.controller;

import com.meteor.framework.common.base.ResponseData;
import com.meteor.service.MyHandleService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lynn
 * @date 2024/3/4
 */

@RestController
@RequestMapping("new/handle")
@Tag(name = "待办管理")
@AllArgsConstructor
public class HandleController {

    private final MyHandleService myHandleService;


    /**
     * 待办统计
     * @param userId 用户Id
     * @return 数量
     */
    @GetMapping("/count/{userId}")
    @Operation(summary = "待办统计")
    public ResponseData countWaitMyHandle(@PathVariable("userId") String userId){
        return ResponseData.success(myHandleService.countWaitMyHandle(userId));
    }

}
